package com.example.demo.common;

import com.example.demo.common.entity.Ceshi01;

public class Test02 {

    int nb;

    private void t(int test01) {
        nb = 1;
    }

    private void t2(Test02 test02) {
        test02.nb = 100;
    }

    public static void main(String[] args) {
        int val = 11;
        System.out.println("初始值：" + val);
        Test02 pt = new Test02();
        pt.t(val);
        System.out.println("值传递后：" + val);
        pt.nb = 99;
        System.out.println("初始值：" + pt.nb);
        pt.t2(pt);
        System.out.println("引用传递后：" + pt.nb);
    }
}
